Primitives added in 4.0.6.3


\begin{defprim}{cblob}{{\em thresh st r} \evec{p} {\em sutface} [{\em st r}
\eve...
...r a blob,
with an additional surface definition for each metaball.
\end{defprim}

The cblob primitive was provided by George McGregor
<mcgregor@ncifcrf.gov>


\begin{defprim}{flame}{{\em size} \evec{p} {\em lightswitch speed}}
Creates a f...
... \lq\lq move'' upward. A
value of 0.5 is suggested as a starting point.
\end{defprim}

The flame primitive was provided by Reto Mani <mani@iam.unibe.ch>


\begin{defprim}{fracland}{{\em seed subdiv}}
This primitive creates a fractal s...
...s generated within rayshade
rather than being read in from a file.
\end{defprim}

The seed value is the seed for the random number function. The seed value specifies the shape of the surface – changing the seed value will randomly change the surface shape.

The subdiv value is the number of subdivisions for the surface – $\em subdiv$ = 0 will produce a flat square, subdiv > 0 will produce a square with an ever more detailed surface. So far, rayshade seems to have trouble with subdivisions greater than eight (if anyone finds otherwise please tell me!!) and produces surfaces with "holes" in it for values greater than this.

The number of points in the surface follows the following formulas, where Size is the total points per side of the object:

Size = (2subdiv) + 1

TotalPoints = Size2

The four corner points will always have an altitude of zero, the maximum altitude should never be never be more 1.0 and the min should never be less than -1.0.

The fracland primitive was provided by Larry Coffin
<lcoffin@clciris.chem.umr.edu>


\begin{defprim}{rotspline}{\evec{base} \evec{apex} {\tt coeffs} $c_3$\ $c_2$
$c_...
... a solid of revolution. This primitive can be defined in two ways.
\end{defprim}


\begin{defprim}{rotspline}{\evec{base} $r_{base}$\ $g_{base}$
\evec{apex} $r_{apex}$\ $g_{apex}$}
\end{defprim}

The curve that is rotated is of the form

r2 = c3x3 + c2x2 + c1x + c0

base is the position of the center of one end and apex is the center of the other. The word coeffs must be included in the first method. rbase and rapex are the radii of the base and apex, and gbase and gapex are the gradients.

The rotspline primitive was provided by Gerald Iles
<ilesg@p4.cs.man.ac.uk>


\begin{defprim}{sweptsph}{{\tt bezier} \evec{p_0} \evec{p_1} \evec{p_2}
\evec{p...
... slope or tangent line for the curve at the first and last
points.
\end{defprim}


\begin{defprim}{sweptsph}{{\tt coeffs} $x_0$\ $x_1$\ $x_2$\ $x_3$
$y_0$\ $y_1$...
...in{displaymath}f_n = c_0 + c_1x + c_2x^2 + c_3x^3 \end{displaymath}\end{defprim}


\begin{defprim}{sweptsph}{[{\tt nbezier} $n_0$\ $n_1$\ $n_2$\ $n_3$]
[{\tt ncoe...
...lues define the \lq\lq speed'' at which the curve leaves the endpoints.
\end{defprim}

Hopefilly the following examples make this clearer:

sweptsph bezier  -10 0 0   -10 0 10   10 0 -10   10 0 0
                 1 0 0 0

sweptsph coeffs  .65 15.7 -22.2 0    0 0 0 0    1 56 -110 65.5
                 1 -1 0 0

sweptsph
         xbezier 0 10 -10 0
         ycoeffs 0 10 -10 0
         zbezier 10 0 0 -10
         .5 6 -6 0

There are a few known bugs:

Other problems:

Using third order equations to define the center path or the radius requires solving a tenth order equation when checking for intersection. All roots over the interval (0, 1) must be found, not just the smallest. The root finder used was one that I wrote that uses a combination of Newton-Rasphson and bisection. It ends up being fairly slow and probably could use some speeding up. A few possibilities would be using Sturm sequences to find the number of roots over an interval (I tried this but my algorithm did not find all the roots and thus produced gaps in the surface. I plan on trying to fix it if I can) and to reduce the polynomial by dividing through by known roots before solving for remaining roots.

Any comments, bug reports, or suggestions for changes or improvements will be greatly appreciated.

This addition provided by Larry Coffin
lcoffin@clciris.chem.umr.edu